﻿#ifndef QPIXITEM_H
#define QPIXITEM_H
#include<QGraphicsItem>
#include<QPixmap>
#include<QPainter>
#include<QGraphicsScene>
//绘图抽象类
class QPixItem:public QGraphicsItem
{
public:
    QPixItem(const QString &fileName,QGraphicsScene *scene);
    //绘制图形的大致区域
    virtual QRectF boundingRect() const;

    //绘制图形
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
protected:
    QPixmap pix;
};

#endif // QPIXITEM_H
